Skip to main content

revXMLChildNames

Type

function

Summary

Returns a list of the child nodes under the specified node in an XML tree.

Syntax

revXMLChildNames(<treeID>, <startNode>, <nameDelim>, <childName>, <includeChildCount>, [incText])

Description

Use the revXMLChildNames function to find out what child node|child nodes are under a parent node.

If the revXMLChildNames function encounters an error, it returns an error message starting with "xmlerr".

note

If the incText form is specified and is true the function will return text nodes in processing. Text nodes can be accessed using the revXMLNodeContents function with the extended path format where text only nodes are numerically indexed eg summary/command/[1] is the first text node of the summary/command node.

Important

The incText form is experimental.

Important

The revXMLChildNames function is part of the XML library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure the "XML" checkbox is checked.

Parameters

NameTypeDescription

treeID

The number returned by the revXMLCreateTree or revXMLCreateTreeFromFile function when you created the XML tree.

startNode

The path to the node whose child nodes you want to list.

nameDelim

The string that separates each child node's name from the rest.

childName

The string specifying which child nodes to list. If it is empty, all child nodes are listed. Otherwise, only child nodes whose name matches the childName are listed.

includeChildCount

bool

Either true or false. If the includeChildCount is true, each node's name is followed by the number of children it has, in brackets.

Examples

revXMLChildNames(1,the currNode of me,comma,,false)
get revXMLChildNames(currTree,line 2 of theNodes,return,"Grass",true)

library: XML library

control structure: function

function: revXMLNumberOfChildren, revXMLText, revXMLMatchingNode, revXMLFirstChild

glossary: LiveCode custom library, return, XML tree, child node, Standalone Application Settings, standalone application, node, parent node

Compatibility and Support

Introduced

LiveCode 2.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?